#*****************************************************************
#  name         : centos
#  remark       : centos base image
#  tag          : 7.0
#  level        : base
#  author       : mason
#  build shell  : docker build -t 10.100.135.125:5000/centos:7.0 .
#  run shell    : docker run -d -P --name centos.7.0 10.100.135.125:5000/centos:7.0 .
#  push shell   : docker push 10.100.135.125:5000/centos:7.0
#  pull shell   : docker pull 10.100.135.125:5000/centos:7.0
#*****************************************************************

FROM centos:7

MAINTAINER "mason" <masl@mail.open.com.cn>

LABEL company="OPEN"

RUN mkdir -p /data/server && \
    mkdir -p /data/app && \
    mkdir -p /data/log && \
    mkdir -p /data/shell && \
    cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone && \
    /bin/echo -e "LANG=\"en_US.UTF-8\"" > /etc/default/local

WORKDIR /data/shell

COPY ./files/shell/build_run.sh /data/shell/
COPY ./files/shell/docker_run.sh /data/shell/

RUN chmod 777 /data/shell/build_run.sh && \
    chmod 777 /data/shell/docker_run.sh && \
    sh /data/shell/build_run.sh


ENTRYPOINT /data/shell/docker_run.sh && /bin/bash
